import React from 'react'
import News from './new'
import NewsData from './newsData'
import {
    BrowserRouter,
    Switch,
    Route
} from 'react-router-dom'

class Router extends React.Component {
    render() {
        return (
            <div>
                <BrowserRouter>
                    <Switch>
                        <Route path="/newsData" component={NewsData} />
                        <Route path="/" component={News} />
                    </Switch>
                </BrowserRouter>
            </div>
        )
    }
}

export default Router